package com.lkj.controller;

import com.lkj.entity.Dept;
import com.lkj.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    @GetMapping("/")
    public String index(){

        Dept dept = deptService.selectDeptByDeptId(1);
        System.out.println(dept);

        return "success";
    }
}
